
import { Component } from 'react' ;

import CustomRouter from './component/CustomRouter' ;

import Plus from "./component/Plus";
import routes from "./router/index";

/**
 * 原生redux 写法
 */
import {
    HashRouter as Router,
    Route,
    Link
} from 'react-router-dom'

import { Provider } from 'react-redux' ;

import store from "./redux-demo/index";

import {render} from 'react-dom';



/**
 * mirror 写法
 */

// import mirror, {
//     actions,
//     connect,
//     render ,
//     Route,
//     Router ,
//     Link
// } from 'mirrorx' ;
// import "./mirrorx/index";



const App =  () =>(
    <Plus>
        <Router>
            <CustomRouter routers={routes} className="router-root" />
        </Router>
    </Plus>
) 

/**
 * 原生redux 写法
 */
render(
    <Provider store={store}>
        <Router>
            <Route  path="/" component={App}></Route>
        </Router>
    </Provider>,
    document.getElementById('app')
)

/**
 * mirror 写法
 */

// render(
//     <App/>,
//     document.getElementById('app')
// )